1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to motion estimation, and more particularly, to motion estimation performed by a processor having a limited memory.
2. Description of the Related Art
Due to development of information technology including the Internet, multimedia services using text, voice and image communication are increased. Multimedia data that is high-capacity data requires a high-capacity storage medium, and broad bandwidth for transmission thereof. Thus, in order to transmit data including text, images, and audio, a compressive coding technology is required.
A basic principle for coding data is to remove redundancy of data. Representative examples of video-coding technologies are inter-frame prediction and intra-frame prediction. The intra-frame prediction is a method of encoding an image, based on high correlation between adjacent pixels within one frame. The inter-frame prediction is a method of encoding an image, based on a similarity between consecutive frames of a video sequence.
In a moving image, as long as there is no rapid change, many parts of the image have few changes between consecutive frames. In particular, motion vector estimation used for inter-frame prediction is one of the representative technologies for encoding an image, wherein the motion vector estimation processes an image by differentially encoding the motion vectors calculated by motion estimation.
In general, a motion vector of a certain block has close correlation with a motion vector of an adjacent partition. Thus, the amount of data to be transmitted can be reduced by estimating the motion vector of a current block from the motion vector of the adjacent partition, and by encoding only a differential vector.
FIG. 1 is a diagram illustrating an example of motion estimation according to related art technology.
In the example of the motion estimation according to the conventional technology, the motion estimation for a macroblock 130 is performed by comparing the macroblock 130 in a current frame with a search range 120 in a reference frame 110.
In general, the search range 120 is a range in the reference frame 110, wherein the range is within a predetermined area defined by coordinates of the macroblock 130, on which the motion estimation is to be performed.
When the search range 120 in the reference frame 110 is transmitted to a memory in a processor, the processor compares the macroblock in the search range 120 with the macroblock 130 on which the motion estimation is to be performed, and performs the motion estimation. In such a case, the processor compares the macroblock 130 in the current frame with one macroblock in the search range 120. When the comparison ends, the processor compares the macroblock 130 with another macroblock located one pixel to the right, and thereby searches a macroblock in the search range 120, wherein the macroblock has the highest similarity to the macroblock 130 in the current frame.
In order to perform the motion estimation for a next macroblock 131, a new search range 121 in the reference frame 110 is transmitted to the memory in the processor. When the transmission ends, the processor performs the motion estimation for the next macroblock 131. However, in the aforementioned motion estimation, it is difficult to prevent transmitted data from being overlapped.
Since a parallel processor in a multi-core system only accesses a limited local memory and processes calculations, data transmission between a main memory and the local memory via Direct Memory Access (DMA) is necessary. For the efficient data transmission in the multi-core system, it is important to enable the DMA to be performed in the background during calculations by the parallel processor.
Accordingly, transmission of high-capacity data for performing small calculations can lower system efficiency. In particular, since video data is high-capacity data, the video data requires a huge amount of data transmission between the main memory and the local memory. As a result, an efficient usage of the data has an effect on a capability of processing the video data.
As mentioned above, since many ranges are transmitted while being mutually overlapped during data transmission, the motion estimation according to the conventional technology can greatly lower system efficiency. Thus, by more efficiently using data, and performing calculations, the time taken to perform motion estimation can be greatly reduced.